namespace SmartMathLibrary
{
    /// <summary>
    /// Interface to implement a ComplexPolynomialComponent class.
    /// </summary>
    public interface IComplexPolynomialComponent
    {
        /// <summary>
        /// Gets or sets the coefficient of the complex polynomial component.
        /// </summary>
        /// <value>The coefficient of the complex polynomial component.</value>
        ComplexNumber Coefficient { get; set; }

        /// <summary>
        /// Gets or sets the exponent of the complex polynomial component.
        /// </summary>
        /// <value>The exponent of the complex polynomial component.</value>
        double Exponent { get; set; }

        /// <summary>
        ///  Inverts the coefficients imaginary number part of the current complex polynomial component.
        /// </summary>
        void InvertCoefficientImaginaryNumberPart();

        /// <summary>
        /// Inverts the coefficients real number part of the current complex polynomial component.
        /// </summary>
        void InvertCoefficientRealNumberPart();

        /// <summary>
        /// Inverts the coefficient of the current complex polynomial component.
        /// </summary>
        void InvertCoefficient();

        /// <summary>
        /// Inverts the value of the exponent.
        /// </summary>
        void InvertExponent();

        /// <summary>
        /// Adds a coefficient value from another ComplexPolynomialComponent to the current coefficient.
        /// </summary>
        /// <param name="add">The component to add.</param>
        void AddCoefficient(ComplexPolynomialComponent add);

        /// <summary>
        /// Calculates the value of the current component with a specified value for x.
        /// </summary>
        /// <param name="x">The value for x.</param>
        /// <returns>The value of the current component with the specified value for x.</returns>
        ComplexNumber CalulateValue(ComplexNumber x);

        /// <summary>
        /// Calculates the value of the current component with a specified value for x.
        /// </summary>
        /// <param name="x">The value for x.</param>
        /// <returns>The value of the current component with the specified value for x.</returns>
        ComplexNumber CalulateValue(double x);

        /// <summary>
        /// Derivatives the current component.
        /// </summary>
        /// <returns>The derivative of the current component.</returns>
        ComplexPolynomialComponent Derivative();

        /// <summary>
        /// Copies the current instance.
        /// </summary>
        /// <returns>A copy of the current instance.</returns>
        ComplexPolynomialComponent Copy();

        /// <summary>
        /// Compares the current component with another one.
        /// </summary>
        /// <param name="compare">The component to compare.</param>
        /// <returns>True if the components are even otherwise, false.</returns>
        bool CompareTo(ComplexPolynomialComponent compare);
    }
}